package com.wutianyi.module.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.wutianyi.module.commons.Pair;

public interface PropertiesMapper {

	@Insert("insert into properties(i_id,o,name,value,gmt_create,gmt_modified)values(#{iId},#{order},#{name},#{value},now(),now())")
	public void insertProperty(@Param("iId") int iId,
			@Param("name") String name, @Param("value") Object value,
			@Param("order") int order);
	
	@Update("update properties set value=#{value},gmt_modified=now() where i_id=#{iId} and id=#{id}")
	public void updateProperty(Pair pair);
}
